# -*- coding:utf-8 -*-


import xadmin
from document.models import Document, Doctype

   
class DocumentAdmin(object):
    list_display = ('title', 'display', 'guest', 'group', 'number', 'category', 'chip', 'version', 'date')
    search_fields = ['title', 'number', 'category']
    list_filter = ['title', 'number', 'category']
    ordering = ('-display', '-guest', 'category', 'title')
    
    
class DoctypeAdmin(object):
    list_display = ('name', 'display')
    search_fields = ['name']
    list_filter = ['name']
      
              
xadmin.site.register(Document, DocumentAdmin)
xadmin.site.register(Doctype, DoctypeAdmin)





